{extend name="public/layout"}
{block name="title"}我要捐赠{/block}
{block name="head"}
<style>
    html, body {
        background-color: #f6f6f6;
    }

    .panels {
        border-radius: 5px;
        padding: 0 0.28800000000000003rem;
    }

    .btn-block-area {
        padding-top: 2.3rem;
    }
    .panels > .panel{
        padding-left:0;
        padding-right: 0;
    }
</style>
{/block}
{block name="content"}

<div class="panel">
    <div class="panels bg-white border-l border-r" id="form1">
        <div class="flex border-b panel">
            <div class="h0 b flex-con">你享有 <span class="text-primary">{:count($corals)}</span> 珠珊瑚命名权</div>
            <img src="/images/icons/coral2.png" alt="" style="width: 0.3936rem;">
        </div>
        {volist name="corals" id="vo"}
        <div class="flex border-b panel">
            <label for="names[{$vo.id}]">
                珊瑚 {$vo.coral_no} 命名：
            </label>
            <div class="flex-con">
                <input class="full-width text-right" required placeholder="请输入命名" id="names[{$vo.id}]"
                       name="names[{$vo.id}]"
                >
            </div>
            <div class="icon icon-next"></div>
        </div>
        {/volist}
    </div>
</div>
<div class="btn-block-area panel">
    <a class="btn-primary btn-block btn-rounded" id="submit" href="javascript:void(0)">
        提交
    </a>
</div>
{:_js('js/phone.js')}
<script>
    $('#submit').on('click', function () {
        c.form('form1', "{:U('rename')}").validate().submit().success(function () {
            ui.tip.show('命名成功');
            setTimeout(function () {
                location.href = "{:U('index/power')}";
            },1500);
        });
    });
</script>

{/block}


